/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.artic.jme3gui.client.loader;

import com.jme3.asset.AssetManager;
import java.util.concurrent.Callable;

/**
 *
 * @author PaulSyntax
 */
public class LoadItemCallable implements Callable<AssetItem>{

    private AssetItem assetItem;
    private AssetManager assetManger;

    public LoadItemCallable(AssetItem assetItem,AssetManager assetManger) {
        this.assetItem = assetItem;
        this.assetManger = assetManger;
    }

    @Override
    public AssetItem call() throws Exception {
          assetItem.setAsset(assetManger.loadAsset(assetItem.getFilename()));
          return  assetItem;
    }
    
}
